<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>js一元运算符</title>
</head>
<body>
  <script>
    let a = 1, b = 1, c = 1, d = 1
    console.log(a++, a)              // 1,2
    console.log(++b, b)              // 2,2
    console.log(c--, c)              // 1,0
    console.log(--d, d)              // 0,0
    console.log(++a+(++b)+(c++)+d++) // 6
    console.log(a, b, c, d)          //3,3,1,1
  </script>
</body>
</html>